package com.xdxc.feign;

import com.xdxc.model.dto.CorrectAnswerDTO;
import com.xdxc.response.Result;
import com.xdxc.vo.QuestionWithOptionsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "xdxc-question")
public interface QuestionFeign {

    @GetMapping("/question-service/qu-idList")
   Result<List<QuestionWithOptionsVo>> getBatchQuestions(@RequestHeader("Authorization") String token ,@RequestBody List<Long> idList);


    @GetMapping("/question-service/question/{quId}")
    Result<QuestionWithOptionsVo> getQuestion(@RequestHeader("Authorization") String token , @PathVariable Long quId);


    @PostMapping("/correctAnswer/getCorrectAnswer")
    Result<CorrectAnswerDTO> getCorrectAnswer(@RequestParam long questionId);


}
